<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>首页</title>
</head>
<body>
菜单示例：
<th:menu level="5">
    <ul>
        <li th:each="item :${localVar}">
            <a th:href="${item.attr.link}" th:target="${item.attr.target}">
                [[${item.name}]]
                <ul th:if="${not #lists.isEmpty(item.children)}">
                    <li th:each="secondItem :${item.children}">
                        <a th:href="@{${secondItem.attr.link}}" th:target="${secondItem.attr.target}">
                            [[${item.name}]]
                        </a>
                    </li>
                </ul>
            </a>
        </li>
    </ul>
</th:menu>
查询数据详情：
<th:detail id="1" type="article">
    <!--查询id为1的文章-->
    <div>
        [[${localVar.title}]]
    </div>
</th:detail>
当前是第[[${pageNumber}]]页，每一页最多有[[${pageSize}]]条数据
<th:list type="article" mode="page" th:pageNumber="${pageNumber}" th:pageSize="${pageSize}"
         th:searchField="${searchField}" th:searchContent="${searchContent}">
    遍历文章列表：
    <ul>
        <li th:each="item : ${localVar.records}">
            <a th:href="@{${#qyUrl.getUrl('article',item.alias)}}" th:text="${item.title}"/>
        </li>
    </ul>
    总共有[[${localVar.totalPages}]]页
    <button th:if="${pageNumber}>1" onclick="prev()">上一页</button>
    <button th:if="${pageNumber}<${localVar.totalPages}" onclick="next()">下一页</button>

        <div th:replace="~{${#qyUrl.getTemplatePath('pagination')}::pagination(${pageNumber},${pageSize},${localVar.totalPages})}"></div>
        <div th:replace="~{${#qyUrl.getFragmentPath('pagination','pagination',pageNumber,pageSize,localVar.totalPages)}}"></div>
</th:list>

</body>
</html>
